<!-- 头部 -->
<include file="Public:header" />

<!-- 资料认证  侧边/头部 -->
<include file="Public:zlrz_header" />

            <div style="height: 976px;" class="nav-a-settings" id="navconfig">
                <ul style="top: 0px;">
                    <li data-nav="showI1">
                        <a href="{:U('laoshi/zlrz',array('newcity'=>$city))}" class="active">
                            <span class="sp2">
                                &nbsp;
                            </span>
                            资料认证
                        </a>
                    </li>
                    <li data-nav="showI2">
                        <a href="{:U('laoshi/zlrz_head',array('newcity'=>$city))}">
                            <span class="sp3">
                                &nbsp;
                            </span>
                            头像
                        </a>
                    </li>
                    <li data-nav="showI3">
                        <a href="{:U('laoshi/introduce',array('newcity'=>$city))}">
                            <span class="sp4">
                                &nbsp;
                            </span>
                            自我介绍
                        </a>
                    </li>
                    <li data-nav="showI4">
                        <a href="{:U('laoshi/teaching',array('newcity'=>$city))}">
                            <span class="sp5">
                                &nbsp;
                            </span>
                            授课信息
                        </a>
                    </li>
                    <li data-nav="showI0">
                        <a href="{:U('laoshi/zhanghao',array('newcity'=>$city))}">
                            <span class="sp1">
                                &nbsp;
                            </span>
                            账号及密码
                        </a>
                    </li>
                    <li data-nav="showI0">
                        <a href="{:U('laoshi/bank',array('newcity'=>$city))}">
                            <span class="sp6">
                                &nbsp;
                            </span>
                            绑定银行卡
                        </a>
                    </li>
                </ul>
            </div>

            <div style="height: 976px;" class="wfor365hls">
                <!-- 资料认证 -->
                <div class="content-a-settings zlrz" id="CoF1">
                    <div class="heaD">
                        <ul class="nav-lia cLr" id="nav-setup-area1">
                            <li>
                                <a href="{:U('laoshi/zlrz',array('newcity'=>$city))}" class="active" data-tab="tab-identitycard">
                                    身份证
                                </a>
                            </li>
                            <li>
                                <a href="{:U('laoshi/zlrz_jsz',array('newcity'=>$city))}" style="position:relative;"
                                data-tab="tab-teacherCertCard">
                                    教师证件
                                </a>
                            </li>
                            <li>
                                <a href="{:U('laoshi/zlrz_qtzj',array('newcity'=>$city))}" data-tab="tab-otherCard">
                                    其他证件
                                </a>
                            </li>
                            <!-- name="yes-certificate" 表示右上角对号 -->
                        </ul>
                    </div>
                    <div class="lrem x-o" id="tab-identitycard">
                        <div class="o0o desc-F60">
                            温馨提示：
                            <br>
                            1、请认真填写您的真实姓名和身份证号，信息不正确将无法通过平台审核。
                        </div>
                        <form class="layui-form" method="post">
                            <div class="o0o cLr editing">
                                <span class="title-o0o">
                                    <label class="star" style="width:100px!important;">
                                        姓名：
                                    </label>
                                </span>
                                <div class="input-tips">
                                    <input type="text" name="sfz_name" placeholder="请输入您的姓名" class="pub" value="{$laoshi_info.sfz_name}" style="width: 180px;">
                                    <?php if ($laoshi_info['sex'] == '男') { ?>
                                        <input type="radio" name="sex" value="男" checked="" title="男">
                                        <input type="radio" name="sex" value="女" title="女">
                                    <?php }else { ?>
                                        <input type="radio" name="sex" value="男" title="男">
                                        <input type="radio" name="sex" value="女" checked="" title="女">
                                    <?php } ?>
                                    <button class="shangchuanpic" lay-submit lay-filter="name" style="width: 80px;height:38px;position: absolute; top:0%;left: 100%;">修改</button>
                                    <span class="msg">输入正确</span>
                                </div>
                            </div>
                        </form>
                        <form class="layui-form" method="post">
                            <div class="o0o cLr editing">
                                <span class="title-o0o">
                                    <label class="star" style="width:100px!important;">
                                        身份证号：
                                    </label>
                                </span>
                                <div class="input-tips">
                                    <input type="text" name="sfz" placeholder="请输入您的身份证" class="pub" value="{$laoshi_info.sfz_num}">
                                    <button class="shangchuanpic" lay-submit lay-filter="sfz_num" style="width: 80px;height:38px;position: absolute; top:0%;left: 100%;">修改</button>
                                    <span class="msg">输入正确</span></div>
                            </div>
                        </form>
                        <div>
                            <p class="star_idcard">
                                <img class="org_star" src="__PUBLIC__/home/images/org_star.png" alt="">
                                上传身份证照片，请点击下方“立即上传”按钮
                            </p>
                        </div>
                        <div class="upload-container cLr">
                            <form action="{:U('laoshi/sfz_img',array('newcity'=>$city))}" method="post" enctype="multipart/form-data">
                                <div class="show-upload fn-left">
                                    <div class="picwrap">
                                    <?php if (empty($laoshi_info['sfz_img'])) { ?>
                                        <img id="identy_photo" src="__PUBLIC__/home/images/iocard.png" alt="您上传的证件照">
                                    <?php }else { ?>
                                        <img id="identy_photo" src="__ROOT__{$laoshi_info.sfz_img}" alt="您上传的证件照">
                                    <?php } ?>
                                    </div> 
                                        <input name="file" type="file" style="opacity: 0.6; position: absolute; left: 40%;">
                                      <button class="shangchuanpic" lay-submit lay-filter="*" style="width: 73px;height:28px;position: absolute; top:93%;left: 40%;">立即上传</button>  
                                </div>
                            </form>
                            <div class="description-upload fn-right">
                                <h3 style="color: #F97110;">
                                    郑重承诺：您上传的证件仅供平台审核使用，不会泄漏给任何机构和个人。
                                    <br>
                                    <br>
                                    <span style="color: #F97110;margin-top: 10px;">
                                        如果图片无法上传，请使用高版本IE(IE10以上)或非IE浏览器进行图片上传操作
                                    </span>
                                </h3>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
<script type="text/javascript">
    layui.use(['form','layer'], function(){
      var layer = layui.layer
      ,form = layui.form();
      //layer.msg('Hello World');

      //姓名
    form.on('submit(name)', function(data){
      //console.log(data);
      // console.log(data.elem) //被执行事件的元素DOM对象，一般为button对象
      // console.log(data.form) //被执行提交的form对象，一般在存在form标签时才会返回
      //console.log(data.field) //当前容器的全部表单字段，名值对形式：{name: value}
        $.ajax({
            url: "{:U('laoshi/name')}",//请求地址
            type: "post",//请求方式
            dataType: "json",//返回数据类型
            data: data.field,//发送的参数
            })
            .done(function(response) {
                  if(response.error==0){
                     layer.msg(response.info ,{icon:5});

                  }else{
                     layer.msg(response.info ,{icon:6});
                     location.reload();

                  }
              })
            .fail(function() {
                alert("ajxs交互失败");
            })  

          return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });    

      //号码
    form.on('submit(sfz_num)', function(data){
        $.ajax({
            url: "{:U('laoshi/sfz_num')}",//请求地址
            type: "post",//请求方式
            dataType: "json",//返回数据类型
            data: data.field,//发送的参数
            })
            .done(function(response) {
                  if(response.error==0){
                     layer.msg(response.info ,{icon:5});

                  }else{
                     layer.msg(response.info ,{icon:6});
                     location.reload();

                  }
              })
            .fail(function() {
                alert("ajxs交互失败");
            })  

          return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        }); 
    });
</script>
</html>